(function(win){
    var editorPTView = win.editorPTView = function(obj, data, domain) {
        obj.html('');
        for(var i=0; i<data.length; i++) {
            var t = data[i].type;
            var v = data[i].value;
            var box = $('<div class="item"></div>');
            switch (t) {
                case 'img':
                    box.append('<img class="img" src="' + (domain + v) + '">');
                    break;
                case 'text':
                    box.append('<p class="text">' + v + '</p>');
                    break;
                case 'title':
                    box.append('<h3 class="title">' + v + '</h3>');
                    break;
            }
            obj.append(box);
        }
        obj.removeClass('hide');
    }
})(window);